//package com.plian.system.controller.dp;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.base.BaseController;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.entity.dp.LimitPeopleEntity;
//import com.plian.system.model.CommonCode;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.search.SearchEntity;
//import com.plian.system.mybatis.search.SearchParamEntiy;
//import com.plian.system.mybatis.search.TokenSearch;
//import com.plian.system.mybatis.support.Condition;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.dp.ILimitPeopleService;
//import com.plian.system.vo.dp.LimitPeopleVO;
//import com.plian.system.wrapper.dp.LimitPeopleWrapper;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiOperationSupport;
//import lombok.AllArgsConstructor;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.validation.Valid;
//import java.util.List;
//
///**
// * 禁入限制人员档案 控制器
// *
// * @author gangan
// * @since 2023-05-23
// */
//@RestController
//@AllArgsConstructor
//@RequestMapping("api/limitPeople")
//@Api(value = "禁入限制人员档案", tags = "禁入限制人员档案接口")
//public class LimitPeopleController extends BaseController {
//
//	private final ILimitPeopleService limitPeopleService;
//
//	private LimitPeopleWrapper limitPeopleWrapper;
//
//	/**
//	 * 禁入限制人员档案 详情
//	 */
//	@PostMapping("/detail")
//	@ApiOperationSupport(order = 1)
//	@ApiOperation(value = "详情", notes = "传入limitPeople")
//	public R<LimitPeopleVO> detail(@RequestBody LimitPeopleEntity limitPeople) {
//		LimitPeopleEntity detail = limitPeopleService.getOne(Condition.getQueryWrapper(limitPeople));
//		return R.data(limitPeopleService.getDetailVO(detail));
//	}
//	/**
//	 * 禁入限制人员档案 分页
//	 */
//	@PostMapping("/list")
//	@ApiOperationSupport(order = 2)
//	@ApiOperation(value = "分页", notes = "传入limitPeople")
//	public ListResult<LimitPeopleVO> list(@RequestBody Query query) {
//		List<SearchEntity> entityList = query.getSearch();
//		query.setDescs("create_time");
//
//		QueryWrapper<LimitPeopleEntity> queryWrapper = SearchParamEntiy.getQueryWrapper(
//				Condition.getQueryWrapper(new LimitPeopleEntity()), entityList
//		);
//		TokenSearch<LimitPeopleEntity> tokenSearch = new TokenSearch<>();
//		tokenSearch.addTokenQuery(queryWrapper, query);
//
//		IPage<LimitPeopleEntity> pages = limitPeopleService.page(Condition.getPage(query), queryWrapper);
//		ListResult<LimitPeopleVO> listResult = new ListResult<>(CommonCode.SUCCESS);
//		List<LimitPeopleVO> voList = limitPeopleWrapper.entityToVO(pages.getRecords());
//		listResult.setList(voList);
//		listResult.setTotal(Long.valueOf(pages.getTotal()).intValue());
//		return listResult;
//	}
//
//	/**
//	 * 禁入限制人员档案 新增或修改
//	 */
//	@PostMapping("/submit")
//	@ApiOperationSupport(order = 6)
//	@ApiOperation(value = "新增或修改", notes = "传入limitPeople")
//	public R submit(@Valid @RequestBody LimitPeopleEntity limitPeople) {
//		return R.status(limitPeopleService.saveOrUpdate(limitPeople));
//	}
//
//	/**
//	 * 禁入限制人员档案 删除
//	 */
//	@PostMapping("/remove")
//	@ApiOperationSupport(order = 7)
//	@ApiOperation(value = "逻辑删除", notes = "传入ids")
//	public R remove(@RequestBody PageData pd) {
//		List<String> ids = (List<String>)pd.get("ids");
//		return R.status(limitPeopleService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA))));
//	}
//
//
//}
